
package com.shop.cloud.common.data.shardingdatabase.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;

/**
 * 分库配置
 *
 * @author
 */
@Data
@RefreshScope
@Configuration
@ConfigurationProperties(prefix = "spring.datasource.sharding")
public class ShardingDataBaseProperties {

	/**
     * 开关
	 */
	private Boolean enabled;
	/**
	 * 数据库名，各租户库命名规则：dbname_tenantId
	 */
	private String dbname;
	/**
	 * 用户名
	 */
	private String dbusername;
	/**
	 * 密码
	 */
	private String dbpassword;

	/**
	 * url
	 */
	private String url;
}
